package com.iven.xie.designpattern.state;

/**
 * @author xiezhendong
 * @date 2021/8/3
 */
public class Context {
    private State state;

    public Context() {
        state = null;
    }

    public void setState(State state) {
        this.state = state;
    }

    public State getState() {
        return state;
    }

    /**
     * 对请求做处理
     */
    public void handle() {
        state.handle(this);
    }
}
